<template>
<div class="main-page">
  <div>
    <tags v-for="(tag,index) in tags" :key="index" :tag="tag" :isActive="tag.isActive"></tags>
    <div style="clear:both"></div>
  </div>
  <div class="content">
    <transition name="slide-fade">
      <!-- <keep-alive> -->
        <router-view></router-view>
      <!-- </keep-alive> -->
    </transition>
  </div>
</div>
</template>

<script>
import Tags from "components/Tags"

export default {
  computed: {
    // 获取store里的标签组
    tags() {
      return this.$store.state.modules.tags.tags
    }
  },
  components: {
    Tags
  }
}
</script>

<style scoped>
.main-page{
  height: 95%;
}
.content{
  background-color: white;
  width: 100%;
  height: 100%;
  border: 0.01em solid rgb(207, 215, 229);
  border-top: none;
  padding: 20px;
}
.slide-fade-enter-active {
  transition: all .2s ease;
}
.slide-fade-leave-active {
  transition: all .2s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.slide-fade-enter, .slide-fade-leave-to {
  transform: translateX(10px);
  opacity: 0;
}
</style>
